import { defineComponent, onMounted, ref } from "vue";

import { ProcessNodeChart } from 'src/modules/trigger/components'
/* enum */
import { TriggerType } from '@src/modules/trigger/model/enum/index.ts'

export default defineComponent({
    name: TriggerType.triggerDesignContentWrap,
    props: {
        triggerId: {
            type: String,
            default: ''
        },
        loading: {
            type: Boolean,
            default: false
        },
        editStatus: {
            type: Boolean,
            default: false
        }
    },
    emit: ['loading'],
    setup(props, { emit }) {

        const loadingChange = (val: boolean) => {
            emit('loading', val)
        }
        return ()=> (
            <main class="trigger-design-main">
                 <ProcessNodeChart triggerId={props.triggerId} onLoading={(val) => loadingChange(val)} loading={props.loading} editStatus={props.editStatus}/>
            </main>
        )
    }
})